import 'element-plus/theme-chalk/dark/css-vars.css';
import '@/assets/scss/index.scss';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

import { createApp } from 'vue';
import { createPinia } from 'pinia';

import App from './App.vue';
import router from './router';

import TemplateView from './components/TemplateView.vue';
import BreadcrumbView from './components/BreadcrumbView.vue';
import PaginationView from './components/PaginationView.vue';

const app = createApp(App);

// element-plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// 全局组件
app.component('MyTemplate', TemplateView);
app.component('MyBread', BreadcrumbView);
app.component('MyPage', PaginationView);

app.use(createPinia());
app.use(router);

app.mount('#app');
